/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package do_.com.bpd.business.referrals.persistence.entities;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Samuel Pichardo
 */
@Entity
@Table(name = "business_referral_case", catalog = "referrer_system", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "BusinessReferralCase.findAll", query = "SELECT b FROM BusinessReferralCase b"),
    @NamedQuery(name = "BusinessReferralCase.findById", query = "SELECT b FROM BusinessReferralCase b WHERE b.id = :id"),
    @NamedQuery(name = "BusinessReferralCase.findByWorkflowStatus", query = "SELECT b FROM BusinessReferralCase b WHERE b.workflowStatus = :workflowStatus"),
    @NamedQuery(name = "BusinessReferralCase.findByDocType", query = "SELECT b FROM BusinessReferralCase b WHERE b.docType = :docType"),
    @NamedQuery(name = "BusinessReferralCase.findByTimeStamp", query = "SELECT b FROM BusinessReferralCase b WHERE b.timeStamp = :timeStamp"),
    @NamedQuery(name = "BusinessReferralCase.findByStatus", query = "SELECT b FROM BusinessReferralCase b WHERE b.status = :status"),
    @NamedQuery(name = "BusinessReferralCase.findByAssociatedReferralId", query = "SELECT b FROM BusinessReferralCase b WHERE b.associatedReferralId = :associatedReferralId"),
    @NamedQuery(name = "BusinessReferralCase.findByClientPhones", query = "SELECT b FROM BusinessReferralCase b WHERE b.clientPhones = :clientPhones"),
    @NamedQuery(name = "BusinessReferralCase.findByClientId", query = "SELECT b FROM BusinessReferralCase b WHERE b.clientId = :clientId"),
    @NamedQuery(name = "BusinessReferralCase.findByProductNumber", query = "SELECT b FROM BusinessReferralCase b WHERE b.productNumber = :productNumber"),
    @NamedQuery(name = "BusinessReferralCase.findBySource", query = "SELECT b FROM BusinessReferralCase b WHERE b.source = :source"),
    @NamedQuery(name = "BusinessReferralCase.findByCif", query = "SELECT b FROM BusinessReferralCase b WHERE b.cif = :cif"),
    @NamedQuery(name = "BusinessReferralCase.findByClientFullName", query = "SELECT b FROM BusinessReferralCase b WHERE b.clientFullName = :clientFullName")})
public class BusinessReferralCase implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @NotNull
    @Column(name = "id", nullable = false)
    private Integer id;
    @Size(max = 45)
    @Column(name = "workflow_status", length = 45)
    private String workflowStatus;
    @Size(max = 2)
    @Column(name = "doc_type", length = 2)
    private String docType;
    @Column(name = "time_stamp")
    @Temporal(TemporalType.TIMESTAMP)
    private Date timeStamp;
    @Size(max = 10)
    @Column(name = "status", length = 10)
    private String status;
    @Column(name = "associated_referral_id")
    private Integer associatedReferralId;
    @Size(max = 100)
    @Column(name = "client_phones", length = 100)
    private String clientPhones;
    @Lob
    @Size(max = 65535)
    @Column(name = "client_address", length = 65535)
    private String clientAddress;
    @Size(max = 45)
    @Column(name = "client_id", length = 45)
    private String clientId;
    @Size(max = 45)
    @Column(name = "product_number", length = 45)
    private String productNumber;
    @Size(max = 2)
    @Column(name = "source", length = 2)
    private String source;
    @Size(max = 45)
    @Column(name = "cif", length = 45)
    private String cif;
    @Size(max = 60)
    @Column(name = "client_full_name", length = 60)
    private String clientFullName;

    public BusinessReferralCase() {
    }

    public BusinessReferralCase(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getWorkflowStatus() {
        return workflowStatus;
    }

    public void setWorkflowStatus(String workflowStatus) {
        this.workflowStatus = workflowStatus;
    }

    public String getDocType() {
        return docType;
    }

    public void setDocType(String docType) {
        this.docType = docType;
    }

    public Date getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(Date timeStamp) {
        this.timeStamp = timeStamp;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getAssociatedReferralId() {
        return associatedReferralId;
    }

    public void setAssociatedReferralId(Integer associatedReferralId) {
        this.associatedReferralId = associatedReferralId;
    }

    public String getClientPhones() {
        return clientPhones;
    }

    public void setClientPhones(String clientPhones) {
        this.clientPhones = clientPhones;
    }

    public String getClientAddress() {
        return clientAddress;
    }

    public void setClientAddress(String clientAddress) {
        this.clientAddress = clientAddress;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public String getProductNumber() {
        return productNumber;
    }

    public void setProductNumber(String productNumber) {
        this.productNumber = productNumber;
    }

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getCif() {
        return cif;
    }

    public void setCif(String cif) {
        this.cif = cif;
    }

    public String getClientFullName() {
        return clientFullName;
    }

    public void setClientFullName(String clientFullName) {
        this.clientFullName = clientFullName;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof BusinessReferralCase)) {
            return false;
        }
        BusinessReferralCase other = (BusinessReferralCase) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "do_.com.bpd.business.referrals.persistence.entities.BusinessReferralCase[ id=" + id + " ]";
    }
    
}
